#include <Architect.hpp>
#include "Troads.hpp"

Troads::Troads()
{
  style = CLASSIC;
  west = east = south = true;
}

void Troads::setBuiltIn()
{
  int roadSize = 8.0; // FIXME : make as parameter of connections
  bv = new AABB(100/*taille plus haut immeuble*/, size, size);
  
  float blocSize = size/2-roadSize/2;
  StreetBloc* b1 = dynamic_cast<StreetBloc*>(archi->get("G_STREETCORNER"));
  b1->set(blocSize, blocSize, minLvl, maxLvl);
  addAsset(b1);

  StreetBloc* b2 = dynamic_cast<StreetBloc*>(archi->get("G_STREETCORNER"));
  b2->set(blocSize, blocSize, minLvl, maxLvl);
  b2->rotateOf(0,0,90);
  b2->translateOf(size,0,0);
  addAsset(b2);
  
  //if(nbLvl >= 10)
  {
    StreetBloc* b3 = dynamic_cast<StreetBloc*>(archi->get("G_STREETBORDER"));
    b3->set(blocSize, size, minLvl, maxLvl);
    b3->rotateOf(0,0,-90);
    b3->translateOf(0,size,0);
    addAsset(b3);
  }
  //else G_STREETBORDER
}
